package com.ls.entity;

import com.alibaba.fastjson.annotation.JSONField;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.extension.activerecord.Model;
import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.Data;
import lombok.EqualsAndHashCode;

import java.io.Serializable;
import java.time.LocalDateTime;
/**
 * <p>
 * 用户反馈
 * </p>
 *
 * @author pengyu
 * @since 2024-10-12
 */
@Data
@EqualsAndHashCode(callSuper = false)
public class FeedbackRecord extends Model<FeedbackRecord> {
    private static final long serialVersionUID=1L;

    /**
     * 自增主键
     */
    @TableId(value = "feedback_record_id", type = IdType.AUTO)
    private Long feedbackRecordId;

    /**
     * 客户主键
     */
    private Long customerId;

    /**
     * 客户电话
     */
    private String phone;

    /**
     * 反馈内容
     */
    private String content;
    @JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8")
    @JSONField(format = "yyyy-MM-dd")
    private LocalDateTime createTime;
    public FeedbackRecord(String content, Long customerId, String phone) {
        this.phone = phone;
        this.customerId = customerId;
        this.content = content;
        this.createTime = LocalDateTime.now();
    }
    @Override
    protected Serializable pkVal() {
        return this.feedbackRecordId;
    }
}
